<template>
	<view style="height: 100%;">
		<view class="centent">
			<view class="navtopbox">
				<view class="navtopboxcenter">
					<view class="title">
						<text>【{{email.title}}】</text>
					</view>
					<view class="time">
						<text>发布日期：{{email.send_time}}</text>
					</view>
					<view class="navcentent">						
						<rich-text :nodes="email.content"></rich-text>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import {
		mapState,
		mapGetters,
		mapMutation,
		mapActions
	} from 'vuex';
	export default {
		computed: {
			...mapState({
				userInfo: state => state.user.userInfo,
				isLogin: state => state.user.isLogin
			})
		},
		data() {
			return {
				email:{
					title:"",
					time:"",
					content:"",
					index:0
				}

			}
		},
		methods: {
			maillistxiangqing(id,index){
				this.$store
					.dispatch('maillistxiangqing', {
						id:id,
						token:this.userInfo.token,
						index:index										
					})
					.then(res => {
						
						this.email = res.data.data																							
					});
			},
			
			
			
		},
		onLoad(data) {
			
			this.maillistxiangqing(data.id,data.index)
		}
	}
</script>

<style lang="less">
	page {
		height: 100%;
		background-color: #f4f4f4;
		box-sizing: border-box;

	}

	.centent {
		background-image: url(../../static/keding.png);
		background-size: 100% auto;
		background-repeat: no-repeat;
		width: 100%;
		height: 100%;

		.navtopbox {
			width: 100%;
			height: 100%;
			padding: 20rpx;
			box-sizing: border-box;

			.navtopboxcenter {
				width: 100%;
				height: 100%;
				background-color: #fff;
				box-shadow: 0rpx 4rpx 17rpx 4rpx rgba(201, 202, 208, 0.35);
				border-radius: 15rpx;
				overflow: hidden;
				padding: 30rpx 20rpx;
				box-sizing: border-box;

				.title {
					font-size: 35rpx;
					font-weight: bold;
					color: #000000;
					margin-bottom: 10rpx;

				}

				.time {
					font-size: 24rpx;
					color: #ccc;
					margin-bottom: 30rpx;
				}

				.navcentent {
					font-size: 26rpx;

				}

			}
		}


	}
</style>
